<html>
<head><meta charset="utf-8"><title>r#item in rustdoc&#x27;s intradoclinks · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html">r#item in rustdoc&#x27;s intradoclinks</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216407722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216407722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216407722">(Nov 11 2020 at 22:46)</a>:</h4>
<p>Does someone knows how <code>[name]: path/to/struct.Item.html</code> is supposed to be written in Intradoc links format when <code>Item</code> is a raw identifier like<code>r#mod</code> ?</p>



<a name="216407748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216407748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216407748">(Nov 11 2020 at 22:46)</a>:</h4>
<p>(Same question if the raw identifier is in the path leading to the item)</p>



<a name="216408050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216408050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216408050">(Nov 11 2020 at 22:51)</a>:</h4>
<p>I have never thought about it <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="216408072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216408072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216408072">(Nov 11 2020 at 22:51)</a>:</h4>
<p>does <code>[name]: path::to::mod</code> work?</p>



<a name="216408755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216408755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216408755">(Nov 11 2020 at 23:01)</a>:</h4>
<p>Haven't tested, I just wondered if someone knew ^^, i'll test now</p>



<a name="216409012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409012">(Nov 11 2020 at 23:05)</a>:</h4>
<p>works like a charm</p>



<a name="216409022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409022">(Nov 11 2020 at 23:05)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">mod</span> <span class="nn">internal</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">r</span><span class="err">#</span><span class="k">mod</span><span class="p">;</span><span class="w"></span>

<span class="w">    </span><span class="sd">/// See [name]</span>
<span class="w">    </span><span class="sd">///</span>
<span class="w">    </span><span class="sd">/// [name]: mod</span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">B</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="sd">/// See [name].</span>
<span class="sd">///</span>
<span class="sd">/// [name]: internal::mod</span>
<span class="k">struct</span> <span class="nc">A</span><span class="p">;</span><span class="w"></span>
</code></pre></div>



<a name="216409098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409098">(Nov 11 2020 at 23:06)</a>:</h4>
<p>I think the <code>r#</code> part never shows up in links</p>



<a name="216409145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409145">(Nov 11 2020 at 23:07)</a>:</h4>
<p>Yep, it has no influence on links at all</p>



<a name="216409196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409196">(Nov 11 2020 at 23:08)</a>:</h4>
<p>(From my quick and dirty experiment)</p>



<a name="216409210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409210">(Nov 11 2020 at 23:08)</a>:</h4>
<p>Nice, I don't have to write more tests, I love rustdoc <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="216409340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409340">(Nov 11 2020 at 23:11)</a>:</h4>
<p><span class="user-mention" data-user-id="307289">@Poliorcetics</span> would you mind adding a test case for this to rustdoc?</p>



<a name="216409365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409365">(Nov 11 2020 at 23:12)</a>:</h4>
<p>No at all, where do I do that ? I have the time right now</p>



<a name="216409393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409393">(Nov 11 2020 at 23:12)</a>:</h4>
<p>it should be pretty easy, just take that file you wrote and put it in <code>src/test/rustdoc</code>, with some <code>@has</code> annotations to make sure the links show up</p>



<a name="216409401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409401">(Nov 11 2020 at 23:12)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/rustdoc-internals.html#dotting-is-and-crossing-ts">https://rustc-dev-guide.rust-lang.org/rustdoc-internals.html#dotting-is-and-crossing-ts</a></p>



<a name="216409871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409871">(Nov 11 2020 at 23:19)</a>:</h4>
<p>What's the syntax for <code>@has</code> ? It seems to be <code>// @has 'page that has the link' 'the html link' 'the intradoclink version'</code> ?</p>



<a name="216409934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216409934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216409934">(Nov 11 2020 at 23:20)</a>:</h4>
<p>search <code>@has</code> in the guide yields nothing</p>



<a name="216410102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410102">(Nov 11 2020 at 23:23)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py#L44">https://github.com/rust-lang/rust/blob/master/src/etc/htmldocck.py#L44</a></p>



<a name="216410117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410117">(Nov 11 2020 at 23:23)</a>:</h4>
<p>(if you're really feeling nice, you could add a link to that in the dev-guide :)</p>



<a name="216410395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410395">(Nov 11 2020 at 23:27)</a>:</h4>
<p><code> The full description of all the commands available to rustdoc tests is in </code>htmldocck.py`. If I read the thing before writing tests I wouldn't ask redundant questions <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span></p>



<a name="216410485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410485">(Nov 11 2020 at 23:28)</a>:</h4>
<p>well, it would still be nice to have a link</p>



<a name="216410530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410530">(Nov 11 2020 at 23:29)</a>:</h4>
<p>Yep, i'll put one to the top of the file and put the <code>@has</code> and <code>@matches</code> attributes in the text for searchability</p>



<a name="216410756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410756">(Nov 11 2020 at 23:32)</a>:</h4>
<p>Is one PR for the whole thing (test for <code>r#mod</code> + rustc-dev-guide) ok or should I split it in two ?</p>



<a name="216410790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410790">(Nov 11 2020 at 23:33)</a>:</h4>
<p>Oh oups, rustc-dev-guide is a submodule, forget what I said</p>



<a name="216410793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410793">(Nov 11 2020 at 23:33)</a>:</h4>
<p>yeah</p>



<a name="216410797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410797">(Nov 11 2020 at 23:33)</a>:</h4>
<p>I would like it to be a subtree though</p>



<a name="216410799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216410799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216410799">(Nov 11 2020 at 23:33)</a>:</h4>
<p>submodules are a pain</p>



<a name="216413198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/r%23item%20in%20rustdoc%27s%20intradoclinks/near/216413198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/r.23item.20in.20rustdoc&#x27;s.20intradoclinks.html#216413198">(Nov 12 2020 at 00:10)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/78962">https://github.com/rust-lang/rust/pull/78962</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>